<?php
class city_model extends CI_Model {
	
	function get_city_point($city_id){
		$query = $this->db->get_where('city', array('id' => $city_id));
		$location_x=$query->row()->point_x;
		$location_y=$query->row()->point_y;
		$data=array(
			'location_x'=>$location_x,
			'location_y'=>$location_y
		);
		return $data;
	}
	
	function get_city_info($id){
		$this->db->where('id',$id);
		$query = $this->db->get('city');
		if($query->num_rows == 1)
		{
			return $query->row();
		}
	}	
}